package com.atguigu.lease.web.admin.service;

import com.atguigu.lease.model.entity.ApartmentInfo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentDetailVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentItemVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentQueryVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentSubmitVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

/**
* @author liubo
* @description 针对表【apartment_info(公寓信息表)】的数据库操作Service
* @createDate 2023-07-24 15:48:00
*/
public interface ApartmentInfoService extends IService<ApartmentInfo> {
    /**
     * 保存或更新公寓信息
     */
    void customSaveOrUpdate(ApartmentSubmitVo apartmentSubmitVo);

    /**
     * 根据动态条件条件，分页，多表查询，公寓信息列表
     * 涉及多表嵌套查询，使用mybatis方案，自定义service层，mapper层
     * @param page
     * @param queryVo
     */
    void customPage(Page<ApartmentItemVo> page, @Param("queryVo") ApartmentQueryVo queryVo);

    /**
     * 根据ID获取公寓详细信息，包含：公寓基本信息，图片列表，配套列表，杂费列表，标签列表
     * @param id
     * @return
     */
    ApartmentDetailVo getDetailById(Long id);

    /**
     * 根据id删除公寓信息，有房间删除失败
     * @param id
     */
    void customRemoveById(Long id);
}
